package com.cww.springboot.helloworld.controller;

import org.hibernate.validator.internal.util.StringHelper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : cww
 * @date : 2020/5/13 23:27
 */
@RestController
public class HelloWorldController {
    /**
     *
     * @param name
     * @return
     */
    @GetMapping("/hello")
    public String hello(String name){
        if(StringHelper.isNullOrEmptyString(name)){
            return "Hello World!";
        }else{
            return "Hello "+name+"!";
        }
    }
}
